<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="order" tagdir="/WEB-INF/tags/order"%>
<div class="order_show" id="cancelPanel">
	<input type="hidden" id="salesOrderId" name="salesOrderId"	value="${order.salesOrderId}" />

	<div class="warning_msg">
		<fmt:message key="salesOrder.cancelPanel.tip" />
	</div>
	<table border="0" cellspacing="0" cellpadding="0"	class="consignee_table" width="100%">
		<tr>
			<th>
				<fmt:message key="salesOrder.orderNo" />
			</th>
			<td>
				${order.orderNo}
			</td>
		</tr>
		<tr>
			<th>
				<fmt:message key="salesOrder.cancelPanel.relatedAction" />
			</th>
			<td>
				
				<ul>
					<li>
						&radic;
						<fmt:message key="salesOrder.cancelPanel.tip.releaseStock"/>
					</li>
					<c:if test="${not empty order.usedCouponNo}">
						<li>
							<hr/>
							<input type="checkbox" name="returnUsedCouponNo" id="returnUsedCouponNo" value="true" checked/>
							<fmt:message key="salesOrder.cancelPanel.tip.returnUsedCouponNo">
								<fmt:param>${order.usedCouponNo}</fmt:param>
							</fmt:message>
						</li>
					</c:if>
					<c:if test="${math:isNotZero(order.usedShopPoint)}">
						<li>
							<hr/>
							<input type="checkbox" name="returnShopPoint" id="returnShopPoint" value="true" checked/>
							<fmt:message key="salesOrder.cancelPanel.tip.returnShopPoint">
								<fmt:param><span class="red">${order.usedShopPoint}</span></fmt:param>
								<fmt:param><span class="red"><common:currencyFormat value="${order.pointPaid}"/></span></fmt:param>
							</fmt:message>：
							<input type="text" id="shopPoint" name="shopPoint" value="${order.usedShopPoint}" class="inputtxt" style="width:50px;"
								validConf="required,integer,maxValue=${order.usedShopPoint}"/>
							<fmt:message key="salesOrder.cancelPanel.tip.returnShopPoint.unit"/>
						</li>
					</c:if>
					<c:forEach items="${order.giftCertificateOrderPayments4Pay}" var="orderPayment" varStatus="status">
						<li>
							<hr/>
							<input type="checkbox" name="returnGiftCertificateCheck" id="returnGiftCertificateCheck${status.index}" value="true" checked
								onclick="if(this.checked){$j('#returnGiftCertificate${status.index}').val(1);}else{$j('#returnGiftCertificate${status.index}').val(0)}"/>
								<input type="hidden" name="returnGiftCertificates"  id="returnGiftCertificate${status.index}" value="1">
							<fmt:message key="salesOrder.cancelPanel.tip.returnGiftCertificateMoney">
								<fmt:param>${orderPayment.giftCertificateNo}</fmt:param>
								<fmt:param><span class="red"><common:currencyFormat value="${orderPayment.paymentAmount}"/></span></fmt:param>
							</fmt:message>:
							${appConfig.defaultCurrencySymbol}<input type="text" id="giftCertificateMoney${status.index}" name="giftCertificateMoneys" value="${orderPayment.paymentAmount}"
																validConf="required,price,maxValue=${orderPayment.paymentAmount}"/>
							<input type="hidden" name="giftCertificateNos" value="${orderPayment.giftCertificateNo}">
																
						</li>
					</c:forEach>
				</ul>
			</td>
		</tr>
		<tr>
			<th>
				<fmt:message key="salesOrder.cancelReason" />(<span class="red">*</span>)
			</th>
			<td>
				<textarea id="cancelReason" name="cancelReason" style="height: 150px; width: 520px" class="textareatxt" validConf="required,maxlength=480"></textarea>
			</td>
		</tr>
		
	</table>
</div>
<script type="text/javascript">
$j(document).ready(function () {
	autoApplyValidate($('cancelPanel'));
});	


</script>
